<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 根据表达值的真假，切换元素的显示与隐藏 -->
		<!-- 原理是修改元素的display来实现显示与隐藏 -->
		<div id="app">
			<img src="image/1%20.jpg" v-show="isShow" /><br />
			<button @click="chanage" >切换</button>
		</div>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script>
			var app = new Vue({
				el:"#app",
				data:{
					isShow:true
				},
				methods:{
					/* close:function(){
						this.isShow = false;
					} */
					chanage:function(){
						this.isShow = !this.isShow
					}
				}
			})
		</script>
	</body>
</html>
